#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

int find_max(int i, vector<int> array) {
    
    vector<int> array2;
   
    array2.insert(array2.end(), array.begin()+i, array.end());
    
    sort(array2.begin(),array2.end());
    
    return array2.size()-1;
}

int main(int argc, char const *argv[])
{
    vector<int> array {6, 9, 5, 10, 1}; 
    
    int nMax = find_max(2,array);
  
    cout<<"Max="<< nMax <<endl;

    
    return 0;
}
